Presenter.present   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 6
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
import {Observer} from '@enbock/state-value-observer/ValueObserver';
2
import React from 'react';
3
import Model from './Model';
4
5
export default class Presenter {
6
  moduleState: Observer<typeof React.Component | null>;
7
8
  constructor(moduleState: Observer<typeof React.Component | null>) {
9 2
    this.moduleState = moduleState;
10
  }
11
12
  present() {
13 1
    const model: Model = new Model();
14 1
    model.module = this.moduleState.value;
15
16 1
    return model;
17
  }
18
}
19